package cn.gemiman.daoyi.module.iot.controller.admin.equipmentmsg.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.gemiman.daoyi.framework.excel.core.annotations.DictFormat;
import cn.gemiman.daoyi.framework.excel.core.convert.DictConvert;

import static cn.gemiman.daoyi.module.iot.enums.DictTypeConstants.EQUIPMENT_MSG_ALARM_STATUS;

@Schema(description = "管理后台 - 设备消息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class EquipmentMsgRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23232")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23332")
    @ExcelProperty("设备编号")
    private Long equipmentId;

    @Schema(description = "设备名称")
    @ExcelProperty("设备名称")
    private String equipmentName;

    @Schema(description = "消息名称")
    @ExcelProperty("消息名称")
    private String msgName;

    @Schema(description = "消息键")
    @ExcelProperty("消息键")
    private String msgKey;

    @Schema(description = "消息值")
    @ExcelProperty("消息值")
    private String msgValue;

    @Schema(description = "报警状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @ExcelProperty(value = "报警状态", converter = DictConvert.class)
    @DictFormat(EQUIPMENT_MSG_ALARM_STATUS)
    private Integer alarmStatus;

    @Schema(description = "消息时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("消息时间")
    private LocalDateTime msgTime;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
